/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.vce.election.domain;

import com.vce.*;
import java.util.List;
/**
 * Municipios
 * @author Ggutierrez
 */
public class Town implements Persistent{
    private Long id;
    private State state;
    private int stateCode;
    private int code;
    private String name;
    private Long registral;
    private boolean head;
    private int sampleSize;
    private Audit audit;
    private boolean tracked;
    private List<BallotCentre> ballots;
    private Long regCount;

    public Town() {
    }

    public Town(State state, int code, String name, Long registral, boolean head, Audit audit) {
        this.state = state;
        this.code = code;
        this.name = name;
        this.registral = registral;
        this.head = head;
        this.audit = audit;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public State getState() {
        return state;
    }

    public void setState(State state) {
        this.state = state;
    }
    
    public int getStateCode() {
        return stateCode;
    }

    public void setStateCode(int stateCode) {
        this.stateCode = stateCode;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getRegistral() {
        return registral;
    }

    public void setRegistral(Long registral) {
        this.registral = registral;
    }

    public boolean isHead() {
        return head;
    }

    public void setHead(boolean head) {
        this.head = head;
    }
    
    public int getSampleSize() {
        return sampleSize;
    }

    public void setSampleSize(int sampleSize) {
        this.sampleSize = sampleSize;
    }

    public Audit getAudit() {
        return audit;
    }

    public void setAudit(Audit audit) {
        this.audit = audit;
    }
    
    @Override
    public int hashCode() {
        return id.hashCode();
    }

    @Override
    public boolean equals(Object other) {
        if (other == this) {
            return true;
        }
        if (!(other instanceof Town)) {
            return false;
        }
        Town _o = (Town) other;
        return id.equals(_o.id);
    }

    public boolean isTracked() {
        return tracked;
    }

    public void setTracked(boolean tracked) {
        this.tracked = tracked;
    }

    public List<BallotCentre> getBallots() {
        return ballots;
    }

    public void setBallots(List<BallotCentre> ballots) {
        this.ballots = ballots;
    }

    public Long getRegCount() {
        return regCount;
    }

    public void setRegCount(Long regCount) {
        this.regCount = regCount;
    }
}
